﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ConsolidationTool.Common.Entities;
using System.Collections.Generic;
using ConsolidationTool.Common;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using ConsolidationTool.WebParts.ControlTemplates;

using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;

namespace ConsolidationTool.WebParts.Layouts.CReport.Brochure
{
    public partial class P10TACF : FSReportBase
    { 
        protected void Page_Load(object sender, EventArgs e)
        {
      
        }

        public override ControlTemplates.CommonEntitySelector TopSelector
        {
            get
            {
                return commonEntitySelector as ControlTemplates.CommonEntitySelector;
            }
        }

     

        public override void GenerateReport_Click(object sender, EventArgs e)
        {
            //邦定current月数据
            BindLastMonth(TopSelector.drpEntity.SelectedValue, TopSelector.yearTextBox.Text, TopSelector.monthTextBox.Text);

        }

        public override void ExportReport_Click(object sender, EventArgs e)
        {
            P6PL Graph01 = null;
            Graph01 = new P6PL();
            Graph01.row01 = Graph01_Day1.Text;
            Graph01.row02 = Graph01_Day2.Text;
            Graph01.row03 = Graph01_Day3.Text;
            Graph01.row04 = Graph01_Day4.Text;
            Graph01.row05 = Graph01_Day5.Text;
            Graph01.row06 = Graph01_Day6.Text;
            Graph01.row07 = Graph01_Day7.Text;
            Graph01.row08 = Graph01_Day8.Text;
            Graph01.row09 = Graph01_Day9.Text;
            Graph01.row10 = Graph01_Day10.Text;
            Graph01.row11 = Graph01_Day11.Text;
            Graph01.row12 = Graph01_Day12.Text;
            Graph01.row13 = Graph01_Day13.Text;

            P6PL Graph02 = null;
            Graph02 = new P6PL();
            Graph02.row01 = Graph02_Day1.Text;
            Graph02.row02 = Graph02_Day2.Text;
            Graph02.row03 = Graph02_Day3.Text;
            Graph02.row04 = Graph02_Day4.Text;
            Graph02.row05 = Graph02_Day5.Text;
            Graph02.row06 = Graph02_Day6.Text;
            Graph02.row07 = Graph02_Day7.Text;
            Graph02.row08 = Graph02_Day8.Text;
            Graph02.row09 = Graph02_Day9.Text;
            Graph02.row10 = Graph02_Day10.Text;
            Graph02.row11 = Graph02_Day11.Text;
            Graph02.row12 = Graph02_Day12.Text;
            Graph02.row13 = Graph02_Day13.Text;

            P6PL col00 = null;
            col00 = new P6PL();
            col00.row01 = Label01_Date1.Text;
            col00.row02 = Label01_Date2.Text;
            col00.row03 = Label01_Date3.Text;
            col00.row04 = Label01_Date4.Text;
            col00.row05 = Label01_Date5.Text;
            col00.row06 = Label02_Date1.Text;
            col00.row07 = Label02_Date2.Text;
            col00.row08 = Label02_Date3.Text;
            col00.row09 = Label02_Date4.Text;
            col00.row10 = Label02_Date5.Text;
            col00.row11 = Label02_Date6.Text;
            col00.row12 = Label03_Date1.Text;
            col00.row13 = Label03_Date2.Text;
            col00.row14 = Label03_Date3.Text;
            col00.row15 = Label03_Date4.Text;
            col00.row16 = Label03_Date5.Text;
            col00.row17 = Label03_Date6.Text;
            col00.row18 = Label04_Date1.Text;
            col00.row19 = Label04_Date2.Text;
            col00.row20 = Label04_Date3.Text;
            col00.row21 = Label04_Date4.Text;
            
            P6PL col01 = null;
            col01 = new P6PL();
            col01.row01 = Label01_Day1.Text;
            col01.row02 = Label02_Day1.Text;
            col01.row03 = Label03_Day1.Text;
            col01.row04 = Label04_Day1.Text;
            col01.row05 = Label05_Day1.Text;
            col01.row06 = Label06_Day1.Text;
            col01.row07 = Label07_Day1.Text;
            col01.row08 = Label08_Day1.Text;
            col01.row09 = Label09_Day1.Text;
            col01.row10 = Label10_Day1.Text;
            col01.row11 = Label11_Day1.Text;
            col01.row12 = Label12_Day1.Text;
            col01.row13 = Label13_Day1.Text;
            col01.row14 = Label14_Day1.Text;
            col01.row15 = Label15_Day1.Text;
            col01.row16 = Label16_Day1.Text;
            col01.row17 = Label17_Day1.Text;
            col01.row18 = Label18_Day1.Text;
            col01.row19 = Label19_Day1.Text;
            col01.row20 = Label20_Day1.Text;
            col01.row21 = Label21_Day1.Text;
            col01.row22 = Label22_Day1.Text;
            col01.row23 = Label23_Day1.Text;
            col01.row24 = Label24_Day1.Text;
            col01.row25 = Label25_Day1.Text;

            P6PL col02 = null;
            col02 = new P6PL();
            col02.row01 = Label01_Day2.Text;
            col02.row02 = Label02_Day2.Text;
            col02.row03 = Label03_Day2.Text;
            col02.row04 = Label04_Day2.Text;
            col02.row05 = Label05_Day2.Text;
            col02.row06 = Label06_Day2.Text;
            col02.row07 = Label07_Day2.Text;
            col02.row08 = Label08_Day2.Text;
            col02.row09 = Label09_Day2.Text;
            col02.row10 = Label10_Day2.Text;
            col02.row11 = Label11_Day2.Text;
            col02.row12 = Label12_Day2.Text;
            col02.row13 = Label13_Day2.Text;
            col02.row14 = Label14_Day2.Text;
            col02.row15 = Label15_Day2.Text;
            col02.row16 = Label16_Day2.Text;
            col02.row17 = Label17_Day2.Text;
            col02.row18 = Label18_Day2.Text;
            col02.row19 = Label19_Day2.Text;
            col02.row20 = Label20_Day2.Text;
            col02.row21 = Label21_Day2.Text;
            col02.row22 = Label22_Day2.Text;
            col02.row23 = Label23_Day2.Text;
            col02.row24 = Label24_Day2.Text;
            col02.row25 = Label25_Day2.Text;

            P6PL col03 = null;
            col03 = new P6PL();
            col03.row01 = Label01_Day3.Text;
            col03.row02 = Label02_Day3.Text;
            col03.row03 = Label03_Day3.Text;
            col03.row04 = Label04_Day3.Text;
            col03.row05 = Label05_Day3.Text;
            col03.row06 = Label06_Day3.Text;
            col03.row07 = Label07_Day3.Text;
            col03.row08 = Label08_Day3.Text;
            col03.row09 = Label09_Day3.Text;
            col03.row10 = Label10_Day3.Text;
            col03.row11 = Label11_Day3.Text;
            col03.row12 = Label12_Day3.Text;
            col03.row13 = Label13_Day3.Text;
            col03.row14 = Label14_Day3.Text;
            col03.row15 = Label15_Day3.Text;
            col03.row16 = Label16_Day3.Text;
            col03.row17 = Label17_Day3.Text;
            col03.row18 = Label18_Day3.Text;
            col03.row19 = Label19_Day3.Text;
            col03.row20 = Label20_Day3.Text;
            col03.row21 = Label21_Day3.Text;
            col03.row22 = Label22_Day3.Text;
            col03.row23 = Label23_Day3.Text;
            col03.row24 = Label24_Day3.Text;
            col03.row25 = Label25_Day3.Text;

            P6PL col04 = null;
            col04 = new P6PL();
            col04.row01 = Label01_Day4.Text;
            col04.row02 = Label02_Day4.Text;
            col04.row03 = Label03_Day4.Text;
            col04.row04 = Label04_Day4.Text;
            col04.row05 = Label05_Day4.Text;
            col04.row06 = Label06_Day4.Text;
            col04.row07 = Label07_Day4.Text;
            col04.row08 = Label08_Day4.Text;
            col04.row09 = Label09_Day4.Text;
            col04.row10 = Label10_Day4.Text;
            col04.row11 = Label11_Day4.Text;
            col04.row12 = Label12_Day4.Text;
            col04.row13 = Label13_Day4.Text;
            col04.row14 = Label14_Day4.Text;
            col04.row15 = Label15_Day4.Text;
            col04.row16 = Label16_Day4.Text;
            col04.row17 = Label17_Day4.Text;
            col04.row18 = Label18_Day4.Text;
            col04.row19 = Label19_Day4.Text;
            col04.row20 = Label20_Day4.Text;
            col04.row21 = Label21_Day4.Text;
            col04.row22 = Label22_Day4.Text;
            col04.row23 = Label23_Day4.Text;
            col04.row24 = Label24_Day4.Text;
            col04.row25 = Label25_Day4.Text;

            P6PL col05 = null;
            col05 = new P6PL();
            col05.row01 = Label01_Day5.Text;
            col05.row02 = Label02_Day5.Text;
            col05.row03 = Label03_Day5.Text;
            col05.row04 = Label04_Day5.Text;
            col05.row05 = Label05_Day5.Text;
            col05.row06 = Label06_Day5.Text;
            col05.row07 = Label07_Day5.Text;
            col05.row08 = Label08_Day5.Text;
            col05.row09 = Label09_Day5.Text;
            col05.row10 = Label10_Day5.Text;
            col05.row11 = Label11_Day5.Text;
            col05.row12 = Label12_Day5.Text;
            col05.row13 = Label13_Day5.Text;
            col05.row14 = Label14_Day5.Text;
            col05.row15 = Label15_Day5.Text;
            col05.row16 = Label16_Day5.Text;
            col05.row17 = Label17_Day5.Text;
            

            P6PL col06 = null;
            col06 = new P6PL();
            //col06.row01 = Label01_Day6.Text;
            col06.row02 = Label02_Day6.Text;
            col06.row03 = Label03_Day6.Text;
            col06.row04 = Label04_Day6.Text;
            col06.row05 = Label05_Day6.Text;
            col06.row06 = Label06_Day6.Text;
            col06.row07 = Label07_Day6.Text;
            col06.row08 = Label08_Day6.Text;
            col06.row09 = Label09_Day6.Text;
            col06.row10 = Label10_Day6.Text;
            col06.row11 = Label11_Day6.Text;
            col06.row12 = Label12_Day6.Text;
            col06.row13 = Label13_Day6.Text;
            col06.row14 = Label14_Day6.Text;
            col06.row15 = Label15_Day6.Text;
            col06.row16 = Label16_Day6.Text;
            col06.row17 = Label17_Day6.Text;
            
            BeforLoad();
            col06.titles = GetReportTitle(13);

            string fileName = TopSelector.yearTextBox.Text + TopSelector.monthTextBox.Text + Constants._Brochure_P10_PRIFIX + TopSelector.drpEntity.SelectedValue + ".xlsx";
            BusinessService.CreateP10Excel(Graph01, Graph02, LabelTitile00.Text, col01, col02, col03, col04, col05, col06, col00, fileName);
        
            string reportUrl = SPContext.Current.Site.Url + "/" + Constants._EXCEL_Library + "/" + fileName;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "Message", string.Format("<script>window.open('" + reportUrl + "');</script>"));

        }

        [Serializable]
        public class fsentity
        {
            public bool controlrow { get; set; }
            public bool datarow { get; set; }
            public bool insertcontrol { get; set; }
            public bool bold { get; set; }
            public string unit { get; set; }
            public string accountcode { get; set; }
            public string description { get; set; }
            public string Jan { get; set; }
            public string Feb { get; set; }
            public string Mar { get; set; }
            public string Apr { get; set; }
            public string May { get; set; }
            public string Jun { get; set; }
            public string Jul { get; set; }
            public string Aug { get; set; }
            public string Sep { get; set; }
            public string Oct { get; set; }
            public string Nov { get; set; }
            public string Dec { get; set; }
            public string L_Dec { get; set; }
            public int digits { get; set; }
        }

        void BindLastMonth(string coCd, string year, string month)
        {
            string strCurrency = TopSelector.lbCompanyCurrency.Text;
            string strTonnage = TopSelector.lbCompanyTonnage.Text;

            int y_1 = Convert.ToInt32(year) - 1;
            string yearN_1 = Convert.ToString(y_1);

            int y_2 = Convert.ToInt32(year) - 2;
            string yearN_2 = Convert.ToString(y_2);

            int m = Convert.ToInt32(TopSelector.monthTextBox.Text);

            Graph01_Day1.Text = "0";
            Graph01_Day2.Text = "0";
            Graph01_Day3.Text = "0";
            Graph01_Day4.Text = "0";
            Graph01_Day5.Text = "0";
            Graph01_Day6.Text = "0";
            Graph01_Day7.Text = "0";
            Graph01_Day8.Text = "0";
            Graph01_Day9.Text = "0";
            Graph01_Day10.Text = "0";
            Graph01_Day11.Text = "0";
            Graph01_Day12.Text = "0";
            Graph01_Day13.Text = "0";

            Graph02_Day1.Text = "0";
            Graph02_Day2.Text = "0";
            Graph02_Day3.Text = "0";
            Graph02_Day4.Text = "0";
            Graph02_Day5.Text = "0";
            Graph02_Day6.Text = "0";
            Graph02_Day7.Text = "0";
            Graph02_Day8.Text = "0";
            Graph02_Day9.Text = "0";
            Graph02_Day10.Text = "0";
            Graph02_Day11.Text = "0";
            Graph02_Day12.Text = "0";
            Graph02_Day13.Text = "0";

            int f = 1;
            for (int i = m; i <= 12; i++)
            {
                string strMonth = i.ToString();

                SPListItem itemICCurr = Common.BusinessService.GetItem(coCd, yearN_1, strMonth, "Indirect Cash flow");
                if (itemICCurr != null)
                {
                    switch (f.ToString())
                    {
                        case "1":
                            Graph01_Day1.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "2":
                            Graph01_Day2.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "3":
                            Graph01_Day3.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "4":
                            Graph01_Day4.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "5":
                            Graph01_Day5.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "6":
                            Graph01_Day6.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "7":
                            Graph01_Day7.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "8":
                            Graph01_Day8.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "9":
                            Graph01_Day9.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "10":
                            Graph01_Day10.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "11":
                            Graph01_Day11.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "12":
                            Graph01_Day12.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        default:
                            break;
                    }
                }
                f = f + 1;
            }

            for (int i = 1; i <= m; i++)
            {
                string strMonth = i.ToString();

                SPListItem itemICCurr = Common.BusinessService.GetItem(coCd, year, strMonth, "Indirect Cash flow");
                if (itemICCurr != null)
                {
                    switch (f.ToString())
                    {
                        case "1":
                            Graph01_Day1.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "2":
                            Graph01_Day2.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "3":
                            Graph01_Day3.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "4":
                            Graph01_Day4.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "5":
                            Graph01_Day5.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "6":
                            Graph01_Day6.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "7":
                            Graph01_Day7.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "8":
                            Graph01_Day8.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "9":
                            Graph01_Day9.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "10":
                            Graph01_Day10.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "11":
                            Graph01_Day11.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "12":
                            Graph01_Day12.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        case "13":
                            Graph01_Day13.Text = itemICCurr["CM_IC02040000"].ToString();
                            break;
                        default:
                            break;
                    }
                }
                f = f + 1;
            }

            List<String> budgetBSIC = new List<String>();
            SPListItem itembudgetBSICN = Common.BusinessService.GetBudgetItem(coCd, year, "Budget_ICF");
            SPListItem itembudgetBSICN_1 = Common.BusinessService.GetBudgetItem(coCd, yearN_1, "Budget_ICF");
            if (itembudgetBSICN_1 != null)
            {
                string billData = itembudgetBSICN_1["BillData"].ToString();

                JavaScriptSerializer Serializer = new JavaScriptSerializer();

                List<fsentity> obj = Serializer.Deserialize<List<fsentity>>(billData);

                var objentity = obj as List<fsentity>;

                objentity.ForEach(p =>
                {
                    if (p.accountcode == "IC03040000")
                    {

                        for (int i = m; i <= 12; i++)
                        {
                            string strMonth = i.ToString();

                            switch (i.ToString())
                            {
                                case "1":
                                    budgetBSIC.Add(p.Jan.ToString());
                                    break;
                                case "2":
                                    budgetBSIC.Add(p.Feb.ToString());
                                    break;
                                case "3":
                                    budgetBSIC.Add(p.Mar.ToString());
                                    break;
                                case "4":
                                    budgetBSIC.Add(p.Apr.ToString());
                                    break;
                                case "5":
                                    budgetBSIC.Add(p.May.ToString());
                                    break;
                                case "6":
                                    budgetBSIC.Add(p.Jun.ToString());
                                    break;
                                case "7":
                                    budgetBSIC.Add(p.Jul.ToString());
                                    break;
                                case "8":
                                    budgetBSIC.Add(p.Aug.ToString());
                                    break;
                                case "9":
                                    budgetBSIC.Add(p.Sep.ToString());
                                    break;
                                case "10":
                                    budgetBSIC.Add(p.Oct.ToString());
                                    break;
                                case "11":
                                    budgetBSIC.Add(p.Nov.ToString());
                                    break;
                                case "12":
                                    budgetBSIC.Add(p.Dec.ToString());
                                    break;
                                default:
                                    break;
                            }
                        }
                    }
                });
            }
            else
            {
                for (int i = m; i <= 12; i++)
                {
                    budgetBSIC.Add("0");
                }
            }

            if (itembudgetBSICN != null)
            {
                string billData = itembudgetBSICN["BillData"].ToString();

                JavaScriptSerializer Serializer = new JavaScriptSerializer();

                List<fsentity> obj = Serializer.Deserialize<List<fsentity>>(billData);

                var objentity = obj as List<fsentity>;

                objentity.ForEach(p =>
                {
                    if (p.accountcode == "IC03040000")
                    {

                        for (int i = 1; i <= m; i++)
                        {
                            string strMonth = i.ToString();

                            switch (i.ToString())
                            {
                                case "1":
                                    budgetBSIC.Add(p.Jan.ToString());
                                    break;
                                case "2":
                                    budgetBSIC.Add(p.Feb.ToString());
                                    break;
                                case "3":
                                    budgetBSIC.Add(p.Mar.ToString());
                                    break;
                                case "4":
                                    budgetBSIC.Add(p.Apr.ToString());
                                    break;
                                case "5":
                                    budgetBSIC.Add(p.May.ToString());
                                    break;
                                case "6":
                                    budgetBSIC.Add(p.Jun.ToString());
                                    break;
                                case "7":
                                    budgetBSIC.Add(p.Jul.ToString());
                                    break;
                                case "8":
                                    budgetBSIC.Add(p.Aug.ToString());
                                    break;
                                case "9":
                                    budgetBSIC.Add(p.Sep.ToString());
                                    break;
                                case "10":
                                    budgetBSIC.Add(p.Oct.ToString());
                                    break;
                                case "11":
                                    budgetBSIC.Add(p.Nov.ToString());
                                    break;
                                case "12":
                                    budgetBSIC.Add(p.Dec.ToString());
                                    break;
                                default:
                                    break;
                            }
                        }
                    }
                });
            }
            else
            {
                for (int i = 1; i <= m; i++)
                {
                    budgetBSIC.Add("0");
                }
            }

            Graph02_Day1.Text = budgetBSIC[0];
            Graph02_Day2.Text = budgetBSIC[1];
            Graph02_Day3.Text = budgetBSIC[2];
            Graph02_Day4.Text = budgetBSIC[3];
            Graph02_Day5.Text = budgetBSIC[4];
            Graph02_Day6.Text = budgetBSIC[5];
            Graph02_Day7.Text = budgetBSIC[6];
            Graph02_Day8.Text = budgetBSIC[7];
            Graph02_Day9.Text = budgetBSIC[8];
            Graph02_Day10.Text = budgetBSIC[9];
            Graph02_Day11.Text = budgetBSIC[10];
            Graph02_Day12.Text = budgetBSIC[11];
            Graph02_Day13.Text = budgetBSIC[12];


            string CurrMthDays = Common.BusinessService.GetMthDays(month, year);
            string CurrMthDaysN_1 = Common.BusinessService.GetMthDays(month, yearN_1);
            string CurrMthDaysN_2 = Common.BusinessService.GetMthDays(month, yearN_2);

            LabelTitile00.Text = strCurrency;
            LabelTitile01.Text = strCurrency;
            LabelTitile02.Text = strCurrency;
            LabelTitile03.Text = strCurrency;

            Label01_Date1.Text = "31/12/" + yearN_2;
            Label01_Date2.Text = "31/12/" + yearN_1;
            Label01_Date3.Text = "31/12/" + yearN_1;
            Label01_Date4.Text = "31/12/" + yearN_1;
            Label01_Date5.Text = "31/12/" + yearN_1;

            Label02_Date1.Text = CurrMthDaysN_1+"/" + month + "/" + yearN_1;
            Label02_Date2.Text = CurrMthDays + "/" + month + "/" + year;
            Label02_Date3.Text = CurrMthDays + "/" + month + "/" + year;
            Label02_Date4.Text = year + "/B" + year;
            Label02_Date5.Text = "31/12/" + year;
            Label02_Date6.Text = "31/12/" + year;

            Label03_Date1.Text = CurrMthDaysN_1 + "/" + month + "/" + yearN_1;
            Label03_Date2.Text = CurrMthDays + "/" + month + "/" + year;
            Label03_Date3.Text = CurrMthDays + "/" + month + "/" + year;
            Label03_Date4.Text = year + "/B" + year;
            Label03_Date5.Text = "31/12/" + year;
            Label03_Date6.Text = "31/12/" + year;

            Label04_Date1.Text = CurrMthDaysN_1 + "/" + month + "/" + yearN_1;
            Label04_Date2.Text = "31/12/" + yearN_1;
            Label04_Date3.Text = CurrMthDays + "/" + month + "/" + year;
            Label04_Date4.Text = "31/12/" + year;

            Label01_Day1.Text = "0";
            Label01_Day2.Text = "0";
            Label01_Day3.Text = "0";
            Label01_Day4.Text = "0";
            Label01_Day5.Text = "0";

            Label17_Day1.Text = "0";
            Label17_Day2.Text = "0";
            Label17_Day3.Text = "0";
            Label17_Day4.Text = "0";
            Label17_Day5.Text = "0";
            Label17_Day6.Text = "0";

            Label18_Day1.Text = "0";
            Label19_Day1.Text = "0";
            Label20_Day1.Text = "0";
            Label21_Day1.Text = "0";
            Label22_Day1.Text = "0";
            Label23_Day1.Text = "0";
            Label24_Day1.Text = "0";
            Label25_Day1.Text = "0";

            Label18_Day2.Text = "0";
            Label19_Day2.Text = "0";
            Label20_Day2.Text = "0";
            Label21_Day2.Text = "0";
            Label22_Day2.Text = "0";
            Label23_Day2.Text = "0";
            Label24_Day2.Text = "0";
            Label25_Day2.Text = "0";

            Label18_Day3.Text = "0";
            Label19_Day3.Text = "0";
            Label20_Day3.Text = "0";
            Label21_Day3.Text = "0";
            Label22_Day3.Text = "0";
            Label23_Day3.Text = "0";
            Label24_Day3.Text = "0";
            Label25_Day3.Text = "0";

            Label18_Day4.Text = "0";
            Label19_Day4.Text = "0";
            Label20_Day4.Text = "0";
            Label21_Day4.Text = "0";
            Label22_Day4.Text = "0";
            Label23_Day4.Text = "0";
            Label24_Day4.Text = "0";
            Label25_Day4.Text = "0";

            SPListItem itemBSN_2Dec = Common.BusinessService.GetItem(coCd, yearN_2, "12", "Balance Sheet");
            SPListItem itemBSN_1Dec = Common.BusinessService.GetItem(coCd, yearN_1, "12", "Balance Sheet");

            if (itemBSN_2Dec != null)
            {
                Label01_Day1.Text = itemBSN_2Dec["CM_BS02030000"].ToString();
            }
            if (itemBSN_1Dec != null)
            {
                Label01_Day3.Text = itemBSN_1Dec["CM_BS02030000"].ToString();
                Label01_Day4.Text = itemBSN_1Dec["CM_BS02030000"].ToString();
            }
            

            SPListItem itemBudgetBS1 = Common.BusinessService.GetBudgetItem(coCd, year, "Budget_BS");

            if (itemBudgetBS1 != null)
            {
                string billData = itemBudgetBS1["BillData"].ToString();

                JavaScriptSerializer Serializer = new JavaScriptSerializer();

                List<fsentity> obj = Serializer.Deserialize<List<fsentity>>(billData);

                var objentity = obj as List<fsentity>;

                objentity.ForEach(p =>
                {
                    if (p.accountcode == "BS03030000")
                    {
                        Label01_Day2.Text = Convert.ToString(Convert.ToDecimal(p.L_Dec.ToString()));
                        Label01_Day5.Text = Convert.ToString(Convert.ToDecimal(p.L_Dec.ToString()));
                    }
                });
            }

            SPListItem itemBS = Common.BusinessService.GetItem(coCd, year, month, "Balance Sheet");
            SPListItem itemBSN_1 = Common.BusinessService.GetItem(coCd, yearN_1, month, "Balance Sheet");

            if (itemBSN_1 != null)
            {
                Label17_Day1.Text = itemBSN_1["CM_BS02030000"].ToString();
            }
            if (itemBS != null)
            {
                Label17_Day3.Text = itemBS["CM_BS02030000"].ToString();
            }

            SPListItem itemBudgetBS = Common.BusinessService.GetBudgetItem(coCd, year, "Budget_BS");

            if (itemBudgetBS != null)
            {
                string billData = itemBudgetBS["BillData"].ToString();

                JavaScriptSerializer Serializer = new JavaScriptSerializer();

                List<fsentity> obj = Serializer.Deserialize<List<fsentity>>(billData);

                var objentity = obj as List<fsentity>;

                objentity.ForEach(p =>
                {
                    if (p.accountcode == "BS03030000")
                    {
                        switch (month)
                        {
                            case "1":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label17_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label17_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040101")
                    {
                        Label18_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040102")
                    {
                        Label19_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040103")
                    {
                        Label20_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040100")
                    {
                        Label21_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040201")
                    {
                        Label22_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040202")
                    {
                        Label23_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040203")
                    {
                        Label24_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "BS03040200")
                    {
                        Label25_Day4.Text = Convert.ToString(Convert.ToDecimal(p.Dec.ToString()));
                    }
                });
            }

            Label17_Day4.Text = (Convert.ToDecimal(Label17_Day3.Text) - Convert.ToDecimal(Label17_Day2.Text)).ToString("n");

            if (itemBSN_1 != null)
            {
                Label18_Day1.Text = itemBSN_1["CM_BS02040101"].ToString();
                Label19_Day1.Text = itemBSN_1["CM_BS02040102"].ToString();
                Label20_Day1.Text = itemBSN_1["CM_BS02040103"].ToString();
                Label21_Day1.Text = itemBSN_1["CM_BS02040100"].ToString();
                Label22_Day1.Text = itemBSN_1["CM_BS02040201"].ToString();
                Label23_Day1.Text = itemBSN_1["CM_BS02040202"].ToString();
                Label24_Day1.Text = itemBSN_1["CM_BS02040203"].ToString();
                Label25_Day1.Text = itemBSN_1["CM_BS02040200"].ToString();
            }

            if (itemBS != null)
            {
                Label18_Day3.Text = itemBS["CM_BS02040101"].ToString();
                Label19_Day3.Text = itemBS["CM_BS02040102"].ToString();
                Label20_Day3.Text = itemBS["CM_BS02040103"].ToString();
                Label21_Day3.Text = itemBS["CM_BS02040100"].ToString();
                Label22_Day3.Text = itemBS["CM_BS02040201"].ToString();
                Label23_Day3.Text = itemBS["CM_BS02040202"].ToString();
                Label24_Day3.Text = itemBS["CM_BS02040203"].ToString();
                Label25_Day3.Text = itemBS["CM_BS02040200"].ToString();
            }

            if (itemBSN_1Dec != null)
            {
                Label18_Day2.Text = itemBSN_1Dec["CM_BS02040101"].ToString();
                Label19_Day2.Text = itemBSN_1Dec["CM_BS02040102"].ToString();
                Label20_Day2.Text = itemBSN_1Dec["CM_BS02040103"].ToString();
                Label21_Day2.Text = itemBSN_1Dec["CM_BS02040100"].ToString();
                Label22_Day2.Text = itemBSN_1Dec["CM_BS02040201"].ToString();
                Label23_Day2.Text = itemBSN_1Dec["CM_BS02040202"].ToString();
                Label24_Day2.Text = itemBSN_1Dec["CM_BS02040203"].ToString();
                Label25_Day2.Text = itemBSN_1Dec["CM_BS02040200"].ToString();
            }
           
            Label02_Day1.Text = "0";
            Label03_Day1.Text = "0";
            Label04_Day1.Text = "0";
            Label05_Day1.Text = "0";
            Label06_Day1.Text = "0";
            Label07_Day1.Text = "0";
            Label08_Day1.Text = "0";
            Label09_Day1.Text = "0";
            Label10_Day1.Text = "0";
            Label11_Day1.Text = "0";
            Label12_Day1.Text = "0";
            Label13_Day1.Text = "0";
            Label14_Day1.Text = "0";
            Label15_Day1.Text = "0";
            Label16_Day1.Text = "0";

            //int m = Convert.ToInt32(TopSelector.monthTextBox.Text);

            for (int i = 1; i <= m; i++)
            {
                string strMonth = i.ToString();

                SPListItem itemICN_1YTD = Common.BusinessService.GetItem(coCd, yearN_1, strMonth, "Indirect Cash flow");
                if (itemICN_1YTD != null)
                {
                    Label02_Day1.Text = Convert.ToString(Convert.ToDecimal(Label02_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070101"].ToString()));
                    Label03_Day1.Text = Convert.ToString(Convert.ToDecimal(Label03_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070102"].ToString()));
                    Label04_Day1.Text = Convert.ToString(Convert.ToDecimal(Label04_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070103"].ToString()));
                    Label05_Day1.Text = Convert.ToString(Convert.ToDecimal(Label05_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070104"].ToString()));
                    Label06_Day1.Text = Convert.ToString(Convert.ToDecimal(Label06_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070100"].ToString()));
                    Label07_Day1.Text = Convert.ToString(Convert.ToDecimal(Label07_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070201"].ToString()));
                    Label08_Day1.Text = Convert.ToString(Convert.ToDecimal(Label08_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070200"].ToString()));
                    Label09_Day1.Text = Convert.ToString(Convert.ToDecimal(Label09_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070301"].ToString()));
                    Label10_Day1.Text = Convert.ToString(Convert.ToDecimal(Label10_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070302"].ToString()));
                    Label11_Day1.Text = Convert.ToString(Convert.ToDecimal(Label11_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070300"].ToString()));
                    Label12_Day1.Text = Convert.ToString(Convert.ToDecimal(Label12_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070401"].ToString()));
                    Label13_Day1.Text = Convert.ToString(Convert.ToDecimal(Label13_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070402"].ToString()));
                    Label14_Day1.Text = Convert.ToString(Convert.ToDecimal(Label14_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070403"].ToString()));
                    Label15_Day1.Text = Convert.ToString(Convert.ToDecimal(Label15_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070404"].ToString()));
                    Label16_Day1.Text = Convert.ToString(Convert.ToDecimal(Label16_Day1.Text) + Convert.ToDecimal(itemICN_1YTD["CM_IC02070400"].ToString()));
                }
            }

            Label02_Day3.Text = "0";
            Label03_Day3.Text = "0";
            Label04_Day3.Text = "0";
            Label05_Day3.Text = "0";
            Label06_Day3.Text = "0";
            Label07_Day3.Text = "0";
            Label08_Day3.Text = "0";
            Label09_Day3.Text = "0";
            Label10_Day3.Text = "0";
            Label11_Day3.Text = "0";
            Label12_Day3.Text = "0";
            Label13_Day3.Text = "0";
            Label14_Day3.Text = "0";
            Label15_Day3.Text = "0";
            Label16_Day3.Text = "0";

            for (int i = 1; i <= m; i++)
            {
                string strMonth = i.ToString();

                SPListItem itemICYTD = Common.BusinessService.GetItem(coCd, year, strMonth, "Indirect Cash flow");
                if (itemICYTD != null)
                {
                    Label02_Day3.Text = Convert.ToString(Convert.ToDecimal(Label02_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070101"].ToString()));
                    Label03_Day3.Text = Convert.ToString(Convert.ToDecimal(Label03_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070102"].ToString()));
                    Label04_Day3.Text = Convert.ToString(Convert.ToDecimal(Label04_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070103"].ToString()));
                    Label05_Day3.Text = Convert.ToString(Convert.ToDecimal(Label05_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070104"].ToString()));
                    Label06_Day3.Text = Convert.ToString(Convert.ToDecimal(Label06_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070100"].ToString()));
                    Label07_Day3.Text = Convert.ToString(Convert.ToDecimal(Label07_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070201"].ToString()));
                    Label08_Day3.Text = Convert.ToString(Convert.ToDecimal(Label08_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070200"].ToString()));
                    Label09_Day3.Text = Convert.ToString(Convert.ToDecimal(Label09_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070301"].ToString()));
                    Label10_Day3.Text = Convert.ToString(Convert.ToDecimal(Label10_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070302"].ToString()));
                    Label11_Day3.Text = Convert.ToString(Convert.ToDecimal(Label11_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070300"].ToString()));
                    Label12_Day3.Text = Convert.ToString(Convert.ToDecimal(Label12_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070401"].ToString()));
                    Label13_Day3.Text = Convert.ToString(Convert.ToDecimal(Label13_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070402"].ToString()));
                    Label14_Day3.Text = Convert.ToString(Convert.ToDecimal(Label14_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070403"].ToString()));
                    Label15_Day3.Text = Convert.ToString(Convert.ToDecimal(Label15_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070404"].ToString()));
                    Label16_Day3.Text = Convert.ToString(Convert.ToDecimal(Label16_Day3.Text) + Convert.ToDecimal(itemICYTD["CM_IC02070400"].ToString()));
                }
            }

            Label02_Day2.Text = "0";
            Label03_Day2.Text = "0";
            Label04_Day2.Text = "0";
            Label05_Day2.Text = "0";
            Label06_Day2.Text = "0";
            Label07_Day2.Text = "0";
            Label08_Day2.Text = "0";
            Label09_Day2.Text = "0";
            Label10_Day2.Text = "0";
            Label11_Day2.Text = "0";
            Label12_Day2.Text = "0";
            Label13_Day2.Text = "0";
            Label14_Day2.Text = "0";
            Label15_Day2.Text = "0";
            Label16_Day2.Text = "0";

            Label02_Day6.Text = "0";
            Label03_Day6.Text = "0";
            Label04_Day6.Text = "0";
            Label05_Day6.Text = "0";
            Label06_Day6.Text = "0";
            Label07_Day6.Text = "0";
            Label08_Day6.Text = "0";
            Label09_Day6.Text = "0";
            Label10_Day6.Text = "0";
            Label11_Day6.Text = "0";
            Label12_Day6.Text = "0";
            Label13_Day6.Text = "0";
            Label14_Day6.Text = "0";
            Label15_Day6.Text = "0";
            Label16_Day6.Text = "0";

            SPListItem itemBudgetIC = Common.BusinessService.GetBudgetItem(coCd, year, "Budget_ICF");

            if (itemBudgetIC != null)
            {
                string billData = itemBudgetIC["BillData"].ToString();

                JavaScriptSerializer Serializer = new JavaScriptSerializer();

                List<fsentity> obj = Serializer.Deserialize<List<fsentity>>(billData);

                var objentity = obj as List<fsentity>;

                objentity.ForEach(p =>
                {
                    if (p.accountcode == "IC03070101")
                    {
                        switch (month)
                        {
                            case "1":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label02_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label02_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070102")
                    {
                        switch (month)
                        {
                            case "1":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label03_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label03_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070103")
                    {
                        switch (month)
                        {
                            case "1":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label04_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label04_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070104")
                    {
                        switch (month)
                        {
                            case "1":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label05_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label05_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070100")
                    {
                        switch (month)
                        {
                            case "1":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label06_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label06_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070201")
                    {
                        switch (month)
                        {
                            case "1":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label07_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label07_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070200")
                    {
                        switch (month)
                        {
                            case "1":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label08_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label08_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070301")
                    {
                        switch (month)
                        {
                            case "1":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label09_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label09_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070302")
                    {
                        switch (month)
                        {
                            case "1":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label10_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label10_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070300")
                    {
                        switch (month)
                        {
                            case "1":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label11_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label11_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070401")
                    {
                        switch (month)
                        {
                            case "1":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label12_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label12_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070402")
                    {
                        switch (month)
                        {
                            case "1":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label13_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label13_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070403")
                    {
                        switch (month)
                        {
                            case "1":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label14_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label14_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070404")
                    {
                        switch (month)
                        {
                            case "1":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label15_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label15_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    if (p.accountcode == "IC03070400")
                    {
                        switch (month)
                        {
                            case "1":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()));
                                break;
                            case "2":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()));
                                break;
                            case "3":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()));
                                break;
                            case "4":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()));
                                break;
                            case "5":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()));
                                break;
                            case "6":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()));
                                break;
                            case "7":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()));
                                break;
                            case "8":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()));
                                break;
                            case "9":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()));
                                break;
                            case "10":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()));
                                break;
                            case "11":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()));
                                break;
                            case "12":
                                Label16_Day2.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                                break;
                            default:
                                break;
                        }
                        Label16_Day6.Text = Convert.ToString(Convert.ToDecimal(p.Jan.ToString()) + Convert.ToDecimal(p.Feb.ToString()) + Convert.ToDecimal(p.Mar.ToString()) + Convert.ToDecimal(p.Apr.ToString()) + Convert.ToDecimal(p.May.ToString()) + Convert.ToDecimal(p.Jun.ToString()) + Convert.ToDecimal(p.Jul.ToString()) + Convert.ToDecimal(p.Aug.ToString()) + Convert.ToDecimal(p.Sep.ToString()) + Convert.ToDecimal(p.Oct.ToString()) + Convert.ToDecimal(p.Nov.ToString()) + Convert.ToDecimal(p.Dec.ToString()));
                    }
                    
                });
            }

            Label02_Day4.Text = "0";
            Label03_Day4.Text = "0";
            Label04_Day4.Text = "0";
            Label05_Day4.Text = "0";
            Label06_Day4.Text = "0";
            Label07_Day4.Text = "0";
            Label08_Day4.Text = "0";
            Label09_Day4.Text = "0";
            Label10_Day4.Text = "0";
            Label11_Day4.Text = "0";
            Label12_Day4.Text = "0";
            Label13_Day4.Text = "0";
            Label14_Day4.Text = "0";
            Label15_Day4.Text = "0";
            Label16_Day4.Text = "0";

            Label02_Day4.Text = (Convert.ToDecimal(Label02_Day3.Text) - Convert.ToDecimal(Label02_Day2.Text)).ToString("n");
            Label03_Day4.Text = (Convert.ToDecimal(Label03_Day3.Text) - Convert.ToDecimal(Label03_Day2.Text)).ToString("n");
            Label04_Day4.Text = (Convert.ToDecimal(Label04_Day3.Text) - Convert.ToDecimal(Label04_Day2.Text)).ToString("n");
            Label05_Day4.Text = (Convert.ToDecimal(Label05_Day3.Text) - Convert.ToDecimal(Label05_Day2.Text)).ToString("n");
            Label06_Day4.Text = (Convert.ToDecimal(Label06_Day3.Text) - Convert.ToDecimal(Label06_Day2.Text)).ToString("n");
            Label07_Day4.Text = (Convert.ToDecimal(Label07_Day3.Text) - Convert.ToDecimal(Label07_Day2.Text)).ToString("n");
            Label08_Day4.Text = (Convert.ToDecimal(Label08_Day3.Text) - Convert.ToDecimal(Label08_Day2.Text)).ToString("n");
            Label09_Day4.Text = (Convert.ToDecimal(Label09_Day3.Text) - Convert.ToDecimal(Label09_Day2.Text)).ToString("n");
            Label10_Day4.Text = (Convert.ToDecimal(Label10_Day3.Text) - Convert.ToDecimal(Label10_Day2.Text)).ToString("n");
            Label11_Day4.Text = (Convert.ToDecimal(Label11_Day3.Text) - Convert.ToDecimal(Label11_Day2.Text)).ToString("n");
            Label12_Day4.Text = (Convert.ToDecimal(Label12_Day3.Text) - Convert.ToDecimal(Label12_Day2.Text)).ToString("n");
            Label13_Day4.Text = (Convert.ToDecimal(Label13_Day3.Text) - Convert.ToDecimal(Label13_Day2.Text)).ToString("n");
            Label14_Day4.Text = (Convert.ToDecimal(Label14_Day3.Text) - Convert.ToDecimal(Label14_Day2.Text)).ToString("n");
            Label15_Day4.Text = (Convert.ToDecimal(Label15_Day3.Text) - Convert.ToDecimal(Label15_Day2.Text)).ToString("n");
            Label16_Day4.Text = (Convert.ToDecimal(Label16_Day3.Text) - Convert.ToDecimal(Label16_Day2.Text)).ToString("n");

            Label02_Day5.Text = "0";
            Label03_Day5.Text = "0";
            Label04_Day5.Text = "0";
            Label05_Day5.Text = "0";
            Label06_Day5.Text = "0";
            Label07_Day5.Text = "0";
            Label08_Day5.Text = "0";
            Label09_Day5.Text = "0";
            Label10_Day5.Text = "0";
            Label11_Day5.Text = "0";
            Label12_Day5.Text = "0";
            Label13_Day5.Text = "0";
            Label14_Day5.Text = "0";
            Label15_Day5.Text = "0";
            Label16_Day5.Text = "0";

            BeforLoad();
            //create title 
            var titles = GetReportTitle(13);
            for (int i = 0; i < titles.Count; i++)
            {
                var lab = this.Page.Controls.AllOfType<Label>().FirstOrDefault(p => p.ID == "lbMonth" + i);
                if (lab != null)
                    lab.Text = titles[i] ;
            }

        }


    }
}
